package com.wu.constant.Enum;

/**
 * @author zhaohw
 */

public enum StateEnum {

	/**
	 * 有效 1
	 */
	VALID(1),

	/**
	 * 无效 0
	 */
	INVALID(0);

	private Integer value;

	private StateEnum(Integer value) {
		this.value = value;
	}

	public Integer getValue() {
		return value;
	}

	public static StateEnum fromValue(Integer val) {
		if (val != null) {
			for (StateEnum item : StateEnum.values()) {
				if (item.value.equals(val)) {
					return item;
				}
			}
		}
		return null;
	}
}
